Imports DAO
Imports DTO

Public Class HocSinhBUS

    'lay danh sach HS 
    Public Function DanhSachHS() As DataTable
        Dim dt As DataTable
        Dim hsDAO As New HocSinhDAO()
        dt = hsDAO.DanhSachHS()
        Return dt
    End Function

    'lay DSHS chua duoc xep lop
    Public Function DSHSChuaXep() As DataTable
        Dim dt As DataTable
        Dim hsDAO As New HocSinhDAO()
        dt = hsDAO.DSHSChuaXep()
        Return dt
    End Function

    ' Them
    Public Sub Them(ByVal hs As HocSinhDTO)
        Dim hsDAO As New HocSinhDAO
        hsDAO.Them(hs)
    End Sub

    'Xoa
    Public Sub Xoa(ByVal hs As HocSinhDTO)
        Dim hsDAO As New HocSinhDAO
        hsDAO.Xoa(hs)
    End Sub

    'Sua
    Public Sub Sua(ByVal hs As HocSinhDTO)
        Dim hsDAO As New HocSinhDAO
        hsDAO.Sua(hs)
    End Sub

    'Cap Nhat : xep lop
    Public Sub CapNhat(ByVal maHS As Integer, ByVal maLH As Integer)
        Dim hsDAO As New HocSinhDAO
        hsDAO.CapNhat(maHS, maLH)
    End Sub

    'Lay DSHS de Nhap Diem
    Public Function DSHSNhapDiem(ByVal MaLH As Integer) As DataTable
        Dim dt As DataTable
        Dim hsDAO As New HocSinhDAO()
        dt = hsDAO.DSHSNhapDiem(MaLH)
        Return dt
    End Function

    ' Ham tra cuu hoc sinh cua giao vien
    Public Function TraCuuHS_GVien(ByVal maLop As Integer, ByVal maNH As Integer, ByVal maHK As Integer, ByVal maLKT As Integer, ByVal maMH As Integer) As DataTable
        Dim dt As DataTable
        Dim hsDAO As New HocSinhDAO()
        dt = hsDAO.TraCuuHS_GVien(maLop, maNH, maHK, maLKT, maMH)
        Return dt
    End Function

    ' ham tra cuu hoc sinh
    Public Function TraCuuHS(ByVal hoTen As String, ByVal email As String, ByVal maLop As Integer, ByVal maNH As Integer, ByVal maHK As Integer, ByVal maLKT As Integer) As DataTable
        Dim dt As DataTable
        Dim hsDAO As New HocSinhDAO()
        dt = hsDAO.TraCuuHS(hoTen, email, maLop, maNH, maHK, maLKT)
        Return dt
    End Function

End Class
